package com.dizner.androidcartest;

import com.google.gson.Gson;

/**
 * 控制类消息
 */
public class ResponseMessage extends BaseMessage {

    public ResponseMessage(long msgId, String msgBody) {
        setMsgId(msgId);
        setMsgBody(msgBody);
        setMsgType(SocketNetworkService.Msg_Type.MSG_CHARACTER);
    }

    @Override
    public String toString() {

        try {
            return new Gson().toJson(this);
        } catch (Exception e) {
            return "TO JSON ERROR";
        }
    }
}
